/*
 * @Description: Test02Game
 * @Author: 平常心
 * @Date: 2024-09-19 11:03:23
 * @LastEditors: 平常心
 * @LastEditTime: 2024-09-19 11:23:40
 */
public class Test02Game {
  public static void main(String[] args) {
    // 开始玩游戏
    // 创建游戏对象
    Game game = new Game();
    // 创建篮球对象
    BasketBall basketBall = new BasketBall();
    // 调用游戏的play方法
    game.start(basketBall);
    // 创建足球对象
    FootBall footBall = new FootBall();
    // 调用游戏的play方法
    game.start(footBall);
    // 创建乒乓球对象
    PingPang pingPang = new PingPang();
    // 调用游戏的play方法
    game.start(pingPang);

    // 创建游戏对象
    Game2 game2 = new Game2();
    // 创建球类
    BasketBall2 basketBall2 = new BasketBall2();
    game2.start(basketBall2);
  }
}